<table id="a6" cellspacing="1" cellpadding="3" style="background: #fff;width:100%">
<tr class="com_table_tr2">
    <td class="aslefttd">Order</td>
    <td >Left</td>
    <td>Right</td>			    
</tr>
<tr id="1" >
    <td class="aslefttd">NO <span>1</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6"  id="lb_1" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_1'].'"';}?>></td>
    <td><input type="text" class="input6"   id="rb_1" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_1'].'"';}?>></td>			    
</tr>
<tr id="2"  class="com_table_tr2">
    <td class="aslefttd">NO <span>2</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_2" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_2'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_2" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_2'].'"';}?>></td>			    
</tr>
<tr id="3" >
    <td class="aslefttd">NO <span>3</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_3" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_3'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_3" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_3'].'"';}?>></td>			    
</tr>
<tr id="4"  class="com_table_tr2">
    <td class="aslefttd">NO <span>4</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_4" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_4'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_4" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_4'].'"';}?>></td>			    
</tr>
<tr id="5" >
    <td class="aslefttd">NO <span>5</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_5" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_5'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_5" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_5'].'"';}?>></td>			    
</tr>
<tr id="6"  class="com_table_tr2">
    <td class="aslefttd">NO <span>6</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_6" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_6'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_6" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_6'].'"';}?>></td>			    
</tr>
<tr id="7" >
    <td class="aslefttd">NO <span>7</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_7" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_7'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_7" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_7'].'"';}?>></td>			    
</tr>
<tr id="8"  class="com_table_tr2">
    <td class="aslefttd">NO <span>8</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_8" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_9'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_8" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_8'].'"';}?>></td>			    
</tr>
<tr id="9" >
    <td class="aslefttd">NO <span>9</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_9" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_10'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_9" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_9'].'"';}?>></td>			    
</tr>
<tr id="10"  class="com_table_tr2">
    <td class="aslefttd">NO <span>10</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_10" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_11'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_10" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_10'].'"';}?>></td>			    
</tr>
<tr id="11" >
    <td class="aslefttd">NO <span>11</span> :</td>
    <td class="aslefttd2"><input type="text" class="input6" id="lb_11" <?php if ($ans) { echo 'value="'.$ans['answer']['lb_11'].'"';}?>></td>
    <td><input type="text" class="input6" id="rb_11" <?php if ($ans) { echo 'value="'.$ans['answer']['rb_11'].'"';}?>></td>			    
</tr>
</table>
<script type="text/javascript">
function getAnswer()
{
    var lb_1 = $.trim($("#lb_1").val());
    var lb_2 = $.trim($("#lb_2").val());
    var lb_3 = $.trim($("#lb_3").val());
    var lb_4 = $.trim($("#lb_4").val());
    var lb_5 = $.trim($("#lb_5").val());
    var lb_6 = $.trim($("#lb_6").val());
    var lb_7 = $.trim($("#lb_7").val());
    var lb_8 = $.trim($("#lb_8").val());
    var lb_9 = $.trim($("#lb_9").val());
    var lb_10 = $.trim($("#lb_10").val());
    var lb_11 = $.trim($("#lb_11").val());

    var rb_1 = $.trim($("#rb_1").val());
    var rb_2 = $.trim($("#rb_2").val());
    var rb_3 = $.trim($("#rb_3").val());
    var rb_4 = $.trim($("#rb_4").val());
    var rb_5 = $.trim($("#rb_5").val());
    var rb_6 = $.trim($("#rb_6").val());
    var rb_7 = $.trim($("#rb_7").val());
    var rb_8 = $.trim($("#rb_8").val());
    var rb_9 = $.trim($("#rb_9").val());
    var rb_10 = $.trim($("#rb_10").val());
    var rb_11 = $.trim($("#rb_11").val());
    
    var tmpobj = {"res":null,"answer":{
        "lb_1":lb_1,
        "lb_2":lb_2,
        "lb_3":lb_3,
        "lb_4":lb_4,
        "lb_5":lb_5,
        "lb_6":lb_6,
        "lb_7":lb_7,
        "lb_8":lb_8,
        "lb_9":lb_9,
        "lb_10":lb_10,
        "lb_11":lb_11,
        "rb_1":rb_1,
        "rb_2":rb_2,
        "rb_3":rb_3,
        "rb_4":rb_4,
        "rb_5":rb_5,
        "rb_6":rb_6,
        "rb_7":rb_7,
        "rb_8":rb_8,
        "rb_9":rb_9,
        "rb_10":rb_10,
        "rb_11":rb_11
        }
    };
    return $.toJSON(tmpobj);
}
</script>